import { RegisterPage } from '../root';
import { schema as IndexSchema } from './list';
import { schema as createSchema } from './create';
import { schema as editSchema } from './edit';
import { schema as settingSchema } from './settings';
import { schema as registerSettingSchema } from './register-settings';
import { schema as wechatSettingSchema } from './wechat-message-settings';
import { schema as viewSchema } from './view';


RegisterPage({
    path: 'org',
    label: '机构管理',
    icon: 'fa fa-sitemap',
    acl: 'org:admin',
    children: [
        {
            path: 'list',
            label: '机构中心',
            schema: IndexSchema,
            url: '/org/list',
            acl: 'org:admin',
        },
        {
            path: '/org/edit/:id',
            label: '修改机构',
            acl: 'org:edit',
            schema: editSchema
        },
        {
            path: '/org/setting/:id',
            label: '模块管理',
            acl: 'org:setting',
            schema: settingSchema
        },
        {
            path: '/org/infosetting/:id',
            label: '自定义认证信息',
            acl: 'org:setting',
            schema: registerSettingSchema
        },
        {
            path: '/org/wechatmessage/:id',
            label: '微信模板信息设置',
            acl: 'org:setting',
            schema: wechatSettingSchema
        },
        {
            path: '/org/view/:id',
            label: '查看机构',
            schema: viewSchema,
            acl: 'org:view',
        },
        {
            path: 'create',
            label: '创建机构',
            schema: createSchema,
            url: '/org/create',
            acl: 'org:create',
        }
    ]
});
